package Control;

import java.io.Serializable;

/**
 * Class <code>Command</code> facades various controller commands.
 * @author Dimon
 */
public class Command extends Controller implements Serializable {

    /**
     * Command sender ID.
     */
    protected String ID;

    /**
     * Constructs new command and assigns its sender ID. <p>
     * All subclasses must call this method in their constructor methods.
     */
    public Command() {
        ID = selfID;
    }

    /**
     * Executes command. Command should be performed whenever it is recieved.
     */
    public synchronized void perform() {
    }

    /**
     * Describes command.
     * @return command description
     */
    @Override
    public String toString() {
        return "(" + ID + ")";
    }
}
